package com.example.demo.dao;

import com.example.demo.entity.LoginPerson;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Optional;

public interface LoginPersonDao extends JpaRepository<LoginPerson,Integer> {

    @Query(value="select * from B_Person p where p.personcode = :personCode and p.password= :password",nativeQuery = true)
    Optional<LoginPerson> findByPersonCode(@Param("personCode") String personCode, @Param("password") String password);
    //HashMap<String, Object>
}
